Skip to content

fix(jsonld): use json-streamer PropertyValueTransformerInterface on symfony 8.1 - #8784

Merged
soyuka merged 2 commits into
api-platform:mainfrom
tacman:fix/json-streamer-property-value-transformer
Nov 4, 2026
Merged

soyuka merged 2 commits into
api-platform:mainfrom
tacman:fix/json-streamer-property-value-transformer

Conversation

@tacman

@tacman tacman commented Nov 2, 2026

Copy link
Copy Markdown
Contributor
Q A
Branch? main
Tickets n/a
License MIT

symfony/json-streamer 8.1 deprecates ValueTransformerInterface and the json_streamer.value_transformer tag in favor of PropertyValueTransformerInterface and json_streamer.property_value_transformer. On a Symfony 8.2 app each container build reports, for IriValueTransformer, TypeValueTransformer and ContextValueTransformer:

  • the deprecated tag on api_platform.jsonld.json_streamer.write.value_transformer.{iri,type,context}
  • the three classes implementing the deprecated interface

Changes:

  • the three JSON-LD transformers implement a new internal ApiPlatform\JsonLd\JsonStreamer\ValueTransformer\PropertyValueTransformerInterface, declared to extend Symfony's PropertyValueTransformerInterface when it exists and the legacy ValueTransformerInterface otherwise
  • json_streamer/common.php picks the tag (and the tagged_locator tag) the same way, so the ^7.4 || ^8.0 constraint still holds

JsonStreamerTransformerPass already merges both tags, so it needs no change.

Checked on an app with symfony/json-streamer 8.2.x-dev: the six deprecations above are gone and a JSON-LD collection request returns 200. I haven't run the test suite or tested against 7.4.

🤖 Generated with Claude Code

tacman and others added 2 commits November 2, 2026 05:37
symfony/json-streamer 8.1 deprecates ValueTransformerInterface and the
"json_streamer.value_transformer" tag in favor of
PropertyValueTransformerInterface and "json_streamer.property_value_transformer".
The JSON-LD transformers now implement a local interface that extends the new
Symfony one when it exists and the legacy one otherwise, and the tag is picked
the same way, so 7.4 keeps working.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@soyuka soyuka changed the title Use the json-streamer PropertyValueTransformerInterface and tag on Symfony 8.1+ fix(jsonld): use json-streamer PropertyValueTransformerInterface on symfony 8.1 Nov 4, 2026
@soyuka soyuka closed this Nov 4, 2026
@soyuka soyuka reopened this Nov 4, 2026
@soyuka
soyuka merged commit 9438ec1 into api-platform:main Nov 4, 2026
108 of 117 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants